using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_NhomQuanLyManagerBase
    {
        public TBL_NhomQuanLyManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity Insert(TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity Update(TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity UpdateWithCondition(TBL_NhomQuanLyEntity obj,TBL_NhomQuanLyEntity objCond)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_NhomQuanLyEntity Delete(TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_NhomQuanLyEntity DeleteWithCondition(TBL_NhomQuanLyEntity objCond)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity DeleteByMaNhomQuanLy (TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.DeleteByField(obj,"MaNhomQuanLy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaNhomQuanLy 
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity DeleteByMaNhomQuanLy (string MaNhomQuanLy )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.MaNhomQuanLy = MaNhomQuanLy;  
            return (TBL_NhomQuanLyEntity)Adapter.DeleteByField(obj,"MaNhomQuanLy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity DeleteByMota (TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.DeleteByField(obj,"Mota");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Mota 
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity DeleteByMota (string Mota )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.Mota = Mota;  
            return (TBL_NhomQuanLyEntity)Adapter.DeleteByField(obj,"Mota");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity DeleteByTenNhomQuanLy (TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity)Adapter.DeleteByField(obj,"TenNhomQuanLy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien TenNhomQuanLy 
        /// </summary>
        /// <returns>TBL_NhomQuanLyEntity</returns>
        public TBL_NhomQuanLyEntity DeleteByTenNhomQuanLy (string TenNhomQuanLy )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.TenNhomQuanLy = TenNhomQuanLy;  
            return (TBL_NhomQuanLyEntity)Adapter.DeleteByField(obj,"TenNhomQuanLy");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_NhomQuanLyEntity Select(TBL_NhomQuanLyEntity obj)
        { 
            return (TBL_NhomQuanLyEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_NhomQuanLyEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_NhomQuanLyEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_NhomQuanLyEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_NhomQuanLyEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_NhomQuanLyEntity> SelectAllLST()
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_NhomQuanLyEntity()),new TBL_NhomQuanLyEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_NhomQuanLyEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_NhomQuanLyEntity(),option),new TBL_NhomQuanLyEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNhomQuanLy (TBL_NhomQuanLyEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaNhomQuanLy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNhomQuanLy (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaNhomQuanLy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectByMaNhomQuanLyLST (TBL_NhomQuanLyEntity obj)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaNhomQuanLy"),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectByMaNhomQuanLyLST (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaNhomQuanLy",option),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNhomQuanLy (string MaNhomQuanLy )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.MaNhomQuanLy = MaNhomQuanLy;  
            return Adapter.SelectByField(obj,"MaNhomQuanLy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaNhomQuanLy (string MaNhomQuanLy, SelectOptions option)
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.MaNhomQuanLy = MaNhomQuanLy;  
            return Adapter.SelectByField(obj,"MaNhomQuanLy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_NhomQuanLyEntity> SelectByMaNhomQuanLyLST (string MaNhomQuanLy )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.MaNhomQuanLy = MaNhomQuanLy;  
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaNhomQuanLy"),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_NhomQuanLyEntity> SelectByMaNhomQuanLyLST (string MaNhomQuanLy, SelectOptions option)
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.MaNhomQuanLy = MaNhomQuanLy;  
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaNhomQuanLy",option),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMota (TBL_NhomQuanLyEntity obj)
        { 
            return Adapter.SelectByField(obj,"Mota");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMota (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Mota",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectByMotaLST (TBL_NhomQuanLyEntity obj)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Mota"),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectByMotaLST (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Mota",option),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMota (string Mota )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.Mota = Mota;  
            return Adapter.SelectByField(obj,"Mota");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMota (string Mota, SelectOptions option)
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.Mota = Mota;  
            return Adapter.SelectByField(obj,"Mota",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_NhomQuanLyEntity> SelectByMotaLST (string Mota )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.Mota = Mota;  
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Mota"),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Mota duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_NhomQuanLyEntity> SelectByMotaLST (string Mota, SelectOptions option)
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.Mota = Mota;  
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Mota",option),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenNhomQuanLy (TBL_NhomQuanLyEntity obj)
        { 
            return Adapter.SelectByField(obj,"TenNhomQuanLy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenNhomQuanLy (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"TenNhomQuanLy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectByTenNhomQuanLyLST (TBL_NhomQuanLyEntity obj)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenNhomQuanLy"),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectByTenNhomQuanLyLST (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"TenNhomQuanLy",option),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenNhomQuanLy (string TenNhomQuanLy )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.TenNhomQuanLy = TenNhomQuanLy;  
            return Adapter.SelectByField(obj,"TenNhomQuanLy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenNhomQuanLy (string TenNhomQuanLy, SelectOptions option)
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.TenNhomQuanLy = TenNhomQuanLy;  
            return Adapter.SelectByField(obj,"TenNhomQuanLy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_NhomQuanLyEntity> SelectByTenNhomQuanLyLST (string TenNhomQuanLy )
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.TenNhomQuanLy = TenNhomQuanLy;  
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenNhomQuanLy"),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenNhomQuanLy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_NhomQuanLyEntity> SelectByTenNhomQuanLyLST (string TenNhomQuanLy, SelectOptions option)
        { 
            TBL_NhomQuanLyEntity obj = new TBL_NhomQuanLyEntity();
            obj.TenNhomQuanLy = TenNhomQuanLy;  
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenNhomQuanLy",option),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectWithConditionLST (TBL_NhomQuanLyEntity obj)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_NhomQuanLyEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_NhomQuanLyEntity></returns>
        public List<TBL_NhomQuanLyEntity> SelectWithConditionLST (TBL_NhomQuanLyEntity obj,SelectOptions option)
        { 
            return  (List<TBL_NhomQuanLyEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_NhomQuanLyEntity());
        }

}
}
